﻿Public Class Nmotovehiculo

    Private objmotovehiculo As Datos.Dmotovehiculo

    Public Sub New()
        objmotovehiculo = New Datos.Dmotovehiculo
    End Sub

    Public Function guardarmotovehiculo(ByVal item As Entidades.Emotovehiculo) As Boolean
        Dim oDatos As New Datos.Dmotovehiculo
        Dim oMotovehiculo As New List(Of Entidades.Emotovehiculo)
        Dim band As Boolean
        Try
            band = oDatos.guardar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function eliminarmotovehiculo(ByVal item As Entidades.Emotovehiculo) As Boolean
        Dim oDatos As New Datos.Dmotovehiculo
        Dim omotoehiculo As New List(Of Entidades.Emotovehiculo)
        Dim band As Boolean
        Try
            band = oDatos.guardar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function modificarmotovehiculo(ByVal Motovehiculos As Entidades.Emotovehiculo) As Boolean
        Dim oDatos As New Datos.Dmotovehiculo
        Dim oMotovehiculo As New List(Of Entidades.Emotovehiculo)
        Dim band As Boolean
        Try
            band = oDatos.modificar(Motovehiculos)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function


    Public Function buscarmotovehiculo(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dmotovehiculo
        Try
            Return oDatos.buscar(texto)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

End Class
